using System;
using System.Globalization;

using Outcoder.UI.Xaml.Data;

namespace Outcoder.UI.Xaml
{
	public class StringToUriBaseConverter : IValueConverter
	{
		public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
		{
			if (value == null)
			{
				return null;
			}

			string url = value.ToString();
			return new Uri(value.ToString(), UriKind.Relative);
		}

		public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
		{
			throw new NotImplementedException();
		}
	}
}